package com.harmontronics.hanma.paas.paas.dto.input;

import com.harmontronics.hanma.paas.paas.domain.app.entity.valueobject.AuthTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 第三方服务
 *
 * @author paas-generator
 * @email paas-generator@harmontronics.com
 * @date 2021-05-17 11:29:08
 */
@Data
public class HmHttpServiceCreateInput {


    /**
     * 服务KEY
     */
    @NotNull(message = "hm.pass.field_non_nullable")
    @NotEmpty(message = "hm.pass.field_non_nullable")
    @NotBlank(message = "hm.pass.field_non_nullable")
    @ApiModelProperty(value = "服务KEY")
    private String key;

    /**
     * 服务名称
     */
    @NotNull(message = "hm.pass.field_non_nullable")
    @NotEmpty(message = "hm.pass.field_non_nullable")
    @NotBlank(message = "hm.pass.field_non_nullable")
    @ApiModelProperty(value = "服务名称")
    private String name;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String remark;

    /**
     * 认证方式
     */
    @ApiModelProperty(value = "认证方式")
    @NotNull(message = "hm.pass.field_non_nullable")
    private AuthTypeEnum authType;

    @NotNull(message = "hm.pass.field_non_nullable")
    @Valid
    private List<HttpServiceSettingInput> settingList;


}
